<template>
	<view class="iconfont" :class="name" :style="{'font-size': fontSize, 'color': color}"></view>
</template>

<script>
	export default {
		name: 'UniIconBar',
		title: '图标',
		props: {
			name: {
				type: String,
				default: ''
			},
			size: {
				type: [String, Number],
				default: 40
			},
			color: {
				type: String,
				default: ''
			},
		},
		computed: {
			fontSize() {
				return typeof this.size === 'number'? `${this.size}rpx`: this.size
			}
		},
		data() {
			return {
			};
		},
		mounted() {
		},
	}
</script>

<style lang="scss">

</style>
